Optimal. Leaf size=204 \[ -\frac {\left (8 a^2+9 a b+3 b^2\right ) \log (1-\sin (c+d x))}{16 (a+b)^3 d}-\frac {\left (8 a^2-9 a b+3 b^2\right ) \log (1+\sin (c+d x))}{16 (a-b)^3 d}+\frac {a^5 \log (a+b \sin (c+d x))}{\left (a^2-b^2\right )^3 d}+\frac {\sec ^4(c+d x) (a-b \sin (c+d x))}{4 \left (a^2-b^2\right ) d}-\frac {\sec ^2(c+d x) \left (4 a \left (2 a^2-b^2\right )-b \left (9 a^2-5 b^2\right ) \sin (c+d x)\right )}{8 \left (a^2-b^2\right )^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.25, antiderivative size = 204, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2800, 1661,
815} \begin {gather*} -\frac {\left (8 a^2+9 a b+3 b^2\right ) \log (1-\sin (c+d x))}{16 d (a+b)^3}-\frac {\left (8 a^2-9 a b+3 b^2\right ) \log (\sin (c+d x)+1)}{16 d (a-b)^3}+\frac {\sec ^4(c+d x) (a-b \sin (c+d x))}{4 d \left (a^2-b^2\right )}-\frac {\sec ^2(c+d x) \left (4 a \left (2 a^2-b^2\right )-b \left (9 a^2-5 b^2\right ) \sin (c+d x)\right )}{8 d \left (a^2-b^2\right )^2}+\frac {a^5 \log (a+b \sin (c+d x))}{d \left (a^2-b^2\right )^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 815
Rule 1661
Rule 2800
Rubi steps
\begin {align*} \int \frac {\tan ^5(c+d x)}{a+b \sin (c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {x^5}{(a+x) \left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\sec ^4(c+d x) (a-b \sin (c+d x))}{4 \left (a^2-b^2\right ) d}+\frac {\text {Subst}\left (\int \frac {\frac {a b^6}{a^2-b^2}-\frac {b^4 \left (4 a^2-b^2\right ) x}{a^2-b^2}-4 b^2 x^3}{(a+x) \left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{4 b^2 d}\\ &=\frac {\sec ^4(c+d x) (a-b \sin (c+d x))}{4 \left (a^2-b^2\right ) d}-\frac {\sec ^2(c+d x) \left (4 a \left (2 a^2-b^2\right )-b \left (9 a^2-5 b^2\right ) \sin (c+d x)\right )}{8 \left (a^2-b^2\right )^2 d}+\frac {\text {Subst}\left (\int \frac {-\frac {a b^6 \left (7 a^2-3 b^2\right )}{\left (a^2-b^2\right )^2}+\frac {b^4 \left (8 a^4-7 a^2 b^2+3 b^4\right ) x}{\left (a^2-b^2\right )^2}}{(a+x) \left (b^2-x^2\right )} \, dx,x,b \sin (c+d x)\right )}{8 b^4 d}\\ &=\frac {\sec ^4(c+d x) (a-b \sin (c+d x))}{4 \left (a^2-b^2\right ) d}-\frac {\sec ^2(c+d x) \left (4 a \left (2 a^2-b^2\right )-b \left (9 a^2-5 b^2\right ) \sin (c+d x)\right )}{8 \left (a^2-b^2\right )^2 d}+\frac {\text {Subst}\left (\int \left (\frac {b^4 \left (8 a^2+9 a b+3 b^2\right )}{2 (a+b)^3 (b-x)}+\frac {8 a^5 b^4}{(a-b)^3 (a+b)^3 (a+x)}+\frac {b^4 \left (8 a^2-9 a b+3 b^2\right )}{2 (-a+b)^3 (b+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{8 b^4 d}\\ &=-\frac {\left (8 a^2+9 a b+3 b^2\right ) \log (1-\sin (c+d x))}{16 (a+b)^3 d}-\frac {\left (8 a^2-9 a b+3 b^2\right ) \log (1+\sin (c+d x))}{16 (a-b)^3 d}+\frac {a^5 \log (a+b \sin (c+d x))}{\left (a^2-b^2\right )^3 d}+\frac {\sec ^4(c+d x) (a-b \sin (c+d x))}{4 \left (a^2-b^2\right ) d}-\frac {\sec ^2(c+d x) \left (4 a \left (2 a^2-b^2\right )-b \left (9 a^2-5 b^2\right ) \sin (c+d x)\right )}{8 \left (a^2-b^2\right )^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.93, size = 184, normalized size = 0.90 \begin {gather*} \frac {-\frac {\left (8 a^2+9 a b+3 b^2\right ) \log (1-\sin (c+d x))}{(a+b)^3}-\frac {\left (8 a^2-9 a b+3 b^2\right ) \log (1+\sin (c+d x))}{(a-b)^3}+\frac {16 a^5 \log (a+b \sin (c+d x))}{(a-b)^3 (a+b)^3}+\frac {1}{(a+b) (-1+\sin (c+d x))^2}+\frac {7 a+5 b}{(a+b)^2 (-1+\sin (c+d x))}+\frac {1}{(a-b) (1+\sin (c+d x))^2}+\frac {-7 a+5 b}{(a-b)^2 (1+\sin (c+d x))}}{16 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.51, size = 189, normalized size = 0.93 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.31, size = 288, normalized size = 1.41 \begin {gather*} \frac {\frac {16 \, a^{5} \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}} - \frac {{\left (8 \, a^{2} - 9 \, a b + 3 \, b^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right )}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} - \frac {{\left (8 \, a^{2} + 9 \, a b + 3 \, b^{2}\right )} \log \left (\sin \left (d x + c\right ) - 1\right )}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} - \frac {2 \, {\left ({\left (9 \, a^{2} b - 5 \, b^{3}\right )} \sin \left (d x + c\right )^{3} + 6 \, a^{3} - 2 \, a b^{2} - 4 \, {\left (2 \, a^{3} - a b^{2}\right )} \sin \left (d x + c\right )^{2} - {\left (7 \, a^{2} b - 3 \, b^{3}\right )} \sin \left (d x + c\right )\right )}}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sin \left (d x + c\right )^{4} + a^{4} - 2 \, a^{2} b^{2} + b^{4} - 2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sin \left (d x + c\right )^{2}}}{16 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.48, size = 261, normalized size = 1.28 \begin {gather*} \frac {16 \, a^{5} \cos \left (d x + c\right )^{4} \log \left (b \sin \left (d x + c\right ) + a\right ) - {\left (8 \, a^{5} + 15 \, a^{4} b - 10 \, a^{2} b^{3} + 3 \, b^{5}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (8 \, a^{5} - 15 \, a^{4} b + 10 \, a^{2} b^{3} - 3 \, b^{5}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 4 \, a^{5} - 8 \, a^{3} b^{2} + 4 \, a b^{4} - 8 \, {\left (2 \, a^{5} - 3 \, a^{3} b^{2} + a b^{4}\right )} \cos \left (d x + c\right )^{2} - 2 \, {\left (2 \, a^{4} b - 4 \, a^{2} b^{3} + 2 \, b^{5} - {\left (9 \, a^{4} b - 14 \, a^{2} b^{3} + 5 \, b^{5}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{16 \, {\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} d \cos \left (d x + c\right )^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.54, size = 343, normalized size = 1.68 \begin {gather*} \frac {\frac {16 \, a^{5} b \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{6} b - 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} - b^{7}} - \frac {{\left (8 \, a^{2} - 9 \, a b + 3 \, b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} - \frac {{\left (8 \, a^{2} + 9 \, a b + 3 \, b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} + \frac {2 \, {\left (6 \, a^{5} \sin \left (d x + c\right )^{4} - 9 \, a^{4} b \sin \left (d x + c\right )^{3} + 14 \, a^{2} b^{3} \sin \left (d x + c\right )^{3} - 5 \, b^{5} \sin \left (d x + c\right )^{3} - 4 \, a^{5} \sin \left (d x + c\right )^{2} - 12 \, a^{3} b^{2} \sin \left (d x + c\right )^{2} + 4 \, a b^{4} \sin \left (d x + c\right )^{2} + 7 \, a^{4} b \sin \left (d x + c\right ) - 10 \, a^{2} b^{3} \sin \left (d x + c\right ) + 3 \, b^{5} \sin \left (d x + c\right ) + 8 \, a^{3} b^{2} - 2 \, a b^{4}\right )}}{{\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} {\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{16 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 12.54, size = 498, normalized size = 2.44 \begin {gather*} \frac {a^5\,\ln \left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )}{d\,\left (a^6-3\,a^4\,b^2+3\,a^2\,b^4-b^6\right )}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,\left (\frac {1}{a+b}-\frac {7\,b}{8\,{\left (a+b\right )}^2}+\frac {b^2}{4\,{\left (a+b\right )}^3}\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )\,\left (\frac {b^2}{4\,{\left (a-b\right )}^3}+\frac {7\,b}{8\,{\left (a-b\right )}^2}+\frac {1}{a-b}\right )}{d}-\frac {\frac {2\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{a^4-2\,a^2\,b^2+b^4}+\frac {2\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{a^4-2\,a^2\,b^2+b^4}+\frac {4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (a\,b^2-2\,a^3\right )}{a^4-2\,a^2\,b^2+b^4}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (7\,a^2\,b-3\,b^3\right )}{4\,\left (a^4-2\,a^2\,b^2+b^4\right )}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (15\,a^2\,b-11\,b^3\right )}{4\,\left (a^4-2\,a^2\,b^2+b^4\right )}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (15\,a^2\,b-11\,b^3\right )}{4\,\left (a^4-2\,a^2\,b^2+b^4\right )}-\frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (7\,a^2-3\,b^2\right )}{4\,\left (a^4-2\,a^2\,b^2+b^4\right )}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________